<?php if ($categorys): ?>
    <?php foreach ($categorys as $j => $category):; ?>
        <div class="<?php echo $j % 2 == 0 ? 'cat-box-product' : 'box-content' ?> ">
            <div class="main-wrap">
                <div>
                    <a href="<?php echo $category->publicUrl ?>"  class="title-address" title="<?php echo $category->name ?>">
                        <?php echo $category->name ?>
                    </a>
                </div>
                <br>
                <div class="row-fluid">
                    <?php $i        = 0; ?>
                    <?php
                    $products = Category::getAllCateByCateId($category);
                    foreach ($products as $value):
                        ?>
                        <div class="cl-relative span3 list-product-hl p-small <?php echo $i % 4 == 0 ? 'mr-l-none' : '' ?>">
                            <div class="p-img-sum img-sum">
                                <a href="<?php echo $value->publicUrl ?>" title="<?php echo $value->name ?>">
                                    <img class="p-img" src="<?php echo $value->getPublicImage(290, 290) ?>" alt="<?php echo $value->url ?>"/>
                                </a>
                                <h2 class="p-title title-product">
                                    <a href="<?php echo $value->publicUrl ?>" title="<?php echo $value->name ?>">
                                        <?php echo MyUtil::word_limiter($value->name, 13) ?>
                                    </a>
                                </h2>
                                <div class="p-sum summary-product">
                                    <?php echo MyUtil::word_limiter($value->description, 25); ?> 
                                </div>
                                <?php if ($value->type == Product::TYPE_NEW_PROJECT): ?>
                                    <div class="ic-new"></div>
                                <?php elseif ($value->type == Product::TYPE_HOT_PROJECT): ?>
                                    <div class="ic-hot"></div>
                                <?php endif; ?>
                            </div>
                            <div class="btn-price row-fluid">
                                <div class="price-item span8">
                                    <?php echo $value->price ?>
                                </div>
                                <a href="<?php echo $value->publicUrl ?>" title="<?php echo $value->name ?>" class="span3 btn btn-primary">
                                    Xem
                                </a>
                                <div class="clear"></div>
                            </div>
                            <!--                                <div class="btn-hover">
                                                                <a href="<?php // echo $value->registerUrl       ?>" title="<?php // echo $value->name       ?>" class=" btn btn-success">
                                                                    ĐK Tham Quan
                                                                </a>
                                                            </div>-->
                        </div>
                        <?php
                        $i++;
                    endforeach;
                    ?>
                    <?php // endif; ?>
                    <div class="clear"></div>
                </div>
            </div>
        </div>
    <?php endforeach; ?>
<?php endif; ?>